/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.groupjjk.spectatorsportsonline.model.login;

import com.groupjjk.spectatorsportsonline.models.MLB.MLBTeam;
import com.groupjjk.spectatorsportsonline.models.NBA.NBATeam;
import java.io.Serializable;
import javax.persistence.*;

/**
 *
 * @author Jrdevelopment
 */
@Entity
public class JUser implements Serializable {
//deberia ser User pero esta reservada la palabra

    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private Long id;
    private String name;
    private String lastName;
    private String phone;
    private String cellPhone;
    private int sex;
    private String identification;
    private int status;
    @OneToOne
    private NBATeam favoriteNBATeam;
    @OneToOne
    private MLBTeam favoriteMLBTeam;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof JUser)) {
            return false;
        }
        JUser other = (JUser) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.groupjjk.spectatorsportsonline.model.login.User[ id=" + id + " ]";
    }

    /**
     * @return the name
     */
    public String getName() {
        return name;
    }

    /**
     * @param name the name to set
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * @return the lastName
     */
    public String getLastName() {
        return lastName;
    }

    /**
     * @param lastName the lastName to set
     */
    public void setLastName(String lastName) {
        this.lastName = lastName;
    }

    /**
     * @return the phone
     */
    public String getPhone() {
        return phone;
    }

    /**
     * @param phone the phone to set
     */
    public void setPhone(String phone) {
        this.phone = phone;
    }

    /**
     * @return the cellPhone
     */
    public String getCellPhone() {
        return cellPhone;
    }

    /**
     * @param cellPhone the cellPhone to set
     */
    public void setCellPhone(String cellPhone) {
        this.cellPhone = cellPhone;
    }

    /**
     * @return the sex
     */
    public int getSex() {
        return sex;
    }

    /**
     * @param sex the sex to set
     */
    public void setSex(int sex) {
        this.sex = sex;
    }

    /**
     * @return the identification
     */
    public String getIdentification() {
        return identification;
    }

    /**
     * @param identification the identification to set
     */
    public void setIdentification(String identification) {
        this.identification = identification;
    }

    /**
     * @return the status
     */
    public int getStatus() {
        return status;
    }

    /**
     * @param status the status to set
     */
    public void setStatus(int status) {
        this.status = status;
    }

    /**
     * @return the favoriteTeam
     */
    public NBATeam getFavoriteNBATeam() {
        return favoriteNBATeam;
    }

    /**
     * @param favoriteTeam the favoriteTeam to set
     */
    public void setFavoriteTeam(NBATeam favoriteNBATeam) {
        this.favoriteNBATeam = favoriteNBATeam;
    }

    /**
     * @return the favoriteMLBTeam
     */
    public MLBTeam getFavoriteMLBTeam() {
        return favoriteMLBTeam;
    }

    /**
     * @param favoriteMLBTeam the favoriteMLBTeam to set
     */
    public void setFavoriteMLBTeam(MLBTeam favoriteMLBTeam) {
        this.favoriteMLBTeam = favoriteMLBTeam;
    }
}
